package main

import (
	"fmt"
)

var moneyPacket float32

func main() {
	fmt.Println("启动")
	fmt.Println("请充值")
	var inputMoner float32
	fmt.Scanln(&inputMoner)
	moneyPacket = moneyPacket + inputMoner
	for {
		fmt.Println("你现在的余额是:", moneyPacket)
		if moneyPacket < 10 {
			fmt.Println("你的钱不够了")
			return
		}
		bmi()
		moneyPacket = moneyPacket - 10
	}
}
func bmi() {
	var name string
	fmt.Println("输入你的名字")
	fmt.Scanln(&name)
	fmt.Println("输入你的身高")
	var height float32
	fmt.Scanln(&height)
	fmt.Println("输入你的体重")
	var weight float32
	fmt.Scanln(&weight)
	var result = weight / (height * height)
	fmt.Print(name)

	switch {
	case result > 18 && result < 24:
		fmt.Println("身材标准")
	case result < 18 && result > 15:
		fmt.Println("身材瘦了")
		fmt.Println("请联系东教练指导")
	case result < 15:
		fmt.Println("太瘦了")
	case result > 24:
		fmt.Println("偏胖了")
		fmt.Println("请联系浩教练指导")
	}

}
